package jsi.spring;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class IntegerWriterImpl implements IIntegerWriter {
	Log log = LogFactory.getLog(this.getClass());

	private int val; /*
						 * (non-Javadoc)
						 * 
						 * @see jsi.spring.IIntegerWriter#setVal(int)
						 */

	public IntegerWriterImpl(){
		
	}
	
	public void setVal(int v) {
		this.val = v;
	} /*
		 * (non-Javadoc)
		 * 
		 * @see jsi.spring.IIntegerWriter#square()
		 */

	public int square() {
		return val * val;
	} /*
		 * (non-Javadoc)
		 * 
		 * @see jsi.spring.IIntegerWriter#writeInt()
		 */

	public void writeInt() {
		System.out.println(val);
	} /*
		 * (non-Javadoc)
		 * 
		 * @see jsi.spring.IIntegerWriter#writeSquare()
		 */

	public void writeSquare() {
		System.out.println(square());
	}
}